package single.shop.search.service.impl; 	

import java.util.HashMap;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import single.shop.search.dao.BrandDAO;
import single.shop.search.model.bean.BrandDO;
import single.shop.search.service.BrandService;


public class BrandServiceImpl implements BrandService{
	private final static Log LOG = LogFactory.getLog(BrandServiceImpl.class);

	private BrandDAO brandDAO;

    public BrandDAO getBrandDAO() {
        return brandDAO;
    }

    public void setBrandDAO(BrandDAO brandDAO) {
        this.brandDAO = brandDAO;
    }

    @Override
    public BrandDO getBrandDoById(int id) {
        HashMap map = new HashMap();
        map.put("id", id);
        List<BrandDO> list = brandDAO.getBrandById(map);
        BrandDO bdo = null;
        if (list != null && list.size() > 0) {
            bdo = list.get(0);
        }
        return bdo;
    }

    @Override
    public void updateBrandById(BrandDO brand) {
        brandDAO.updateBrandById(brand);
    }
	
}

	